const serviceDao = require('../dao/serviceDao');
const serviceCommon = require('../../util/serviceCommon');

const service = {
    handleGetService: async () => {
        let result;
        result = await serviceCommon.getListMethod(serviceDao, 'handleGetService');
        return result;
    },
    handleGetServiceById: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(serviceDao, 'handleGetServiceById', data);
        return result;
    },
    handleAddAppointment: async (data) => {
        let result;
        result = await serviceCommon.addDataMethod(serviceDao, 'handleAddAppointment', data);
        return result;
    },
    handleGetAppointmentByOpenId: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(serviceDao, 'handleGetAppointmentByOpenId', data);
        return result;
    }
};
module.exports = service;